class PatientModel {
  String name;
  int birth;
  String phoneNum;
  String sphoneNum;
  String sex;
  String medicalNumber;
  int lastMenstruation;
  int expectedDate;
  String patientInfoId;
  String assistantId;
  String servicePackageType;
  int babyBirth;
  String note;
  String allergyHistory;
  String isNewPatient;
  String sId;
  String costType;
  String area;
  String address;

  PatientModel(
      {this.name,
      this.birth,
      this.phoneNum,
      this.sphoneNum,
      this.sex,
      this.medicalNumber,
      this.lastMenstruation,
      this.expectedDate,
      this.patientInfoId,
      this.assistantId,
      this.servicePackageType,
      this.babyBirth,
      this.note,
      this.allergyHistory,
      this.isNewPatient,
      this.sId,
      this.costType,
      this.area,
      this.address});

  PatientModel.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    birth = json['birth'];
    phoneNum = json['phoneNum'];
    sphoneNum = json['phone_num'];
    sex = json['sex'];
    medicalNumber = json['medical_number'];
    lastMenstruation = json['last_menstruation'];
    expectedDate = json['expected_date'];
    patientInfoId = json['patient_info_id'];
    assistantId = json['assistant_id'];
    servicePackageType = json['servicePackageType'];
    babyBirth = json['baby_birth'];
    note = json['note'];
    allergyHistory = json['allergy_history'];
    isNewPatient = json['is_new_patient'];
    sId = json['_id'];
    costType = json['cost_type'];
    area = json['area'];
    address = json['address'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['birth'] = this.birth;
    data['phoneNum'] = this.phoneNum;
    data['phone_num'] = this.sphoneNum;
    data['sex'] = this.sex;
    data['medical_number'] = this.medicalNumber;
    data['last_menstruation'] = this.lastMenstruation;
    data['expected_date'] = this.expectedDate;
    data['patient_info_id'] = this.patientInfoId;
    data['assistant_id'] = this.assistantId;
    data['servicePackageType'] = this.servicePackageType;
    data['baby_birth'] = this.babyBirth;
    data['note'] = this.note;
    data['allergy_history'] = this.allergyHistory;
    data['is_new_patient'] = this.isNewPatient;
    data['_id'] = this.sId;
    data['cost_type'] = this.costType;
    data['area'] = this.area;
    data['address'] = this.address;
    return data;
  }
}

